package cn.reinforce.web;

import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import com.fasterxml.jackson.module.paramnames.ParameterNamesModule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class FateFlyApplication {

	public static void main(String[] args) {
		SpringApplication.run(FateFlyApplication.class, args);
	}

	@Bean
	public ObjectMapper ObjectMapper(){
		//优化JSON输出
		ObjectMapper objectMapper=new ObjectMapper()
				.registerModule(new ParameterNamesModule())
				.registerModule(new Jdk8Module())
				.registerModule(new JavaTimeModule());
		return objectMapper;
	}
}
